Repository navigation
Test dose trends and candidate shapes, and find lowest effective doses - #83
Merged
parashardhapola merged 7 commits intoNov 20, 2026
Merged
Conversation
The MCP step of MCP-Mod tests a dose signal against a few expected shapes of response, each turned into the contrast of the dose groups that best detects it, and calling each dose of thousands of genes needs an error rate over the genes, not only within each gene. CytePool had neither the shapes nor these two procedures. CandidateShapes holds Emax, sigmoid Emax, exponential and beta shapes in DoseFinding's model families, gives each shape's means at any doses as DoseFinding's getResp does, and places shapes over a series' doses with spread: positions along the dose axis between the lowest and highest treated dose, an exponential shape that reaches half its change late, and a beta umbrella that peaks mid-range. optimal_contrasts builds each shape's contrast, proportional to S^-1 (mu - m 1), as optContr does. stage_wise_adjusted_p_values gives stageR's stage-wise adjusted p-values: a Benjamini-Hochberg screen calls R of G genes, and in each gene called Holm's step-down procedure with Shaffer's first step runs at the level R alpha / G, which controls the overall false discovery rate of the genes. DoseAxis and CandidateShapes read a sample table's doses through one shared function. The tests compare the shapes, contrasts and adjusted p-values with DoseFinding 1.4-2 and stageR 1.28.0 fixtures, values derived by hand, a closed test of Bonferroni tests enumerated in the test, and invariants such as unit invariance and the non-centrality the optimal contrast maximises.
A gene's spline test says that it responds to a dose, not which doses differ from the vehicle, whether the response grows in dose order, which expected shape it follows, or from which dose it starts. Calling each dose against the vehicle in every gene multiplies the false calls by the doses. dose_response runs three multiple contrast tests of each cell type's one moderated fit when they are named in tests: "dunnett", each dose against the vehicle; "williams", the Williams-type test of the vehicle against the pooled top doses, weighted by the cell type's samples; and "mcp", the MCP step of MCP-Mod on candidate shapes, given or spread over the design's doses. Each is two-sided, takes the gene's own covariance of its doses' estimates, voom's weights included, and the smallest df of its doses under dream, and adjusts across genes by Benjamini-Hochberg within and across cell types. One recorded seed reproduces the p-values, each cell type and test drawing from it, its name and its position. DoseResponseResult.lowest_effective_doses calls each dose in the genes that a test of any response calls, the spline by default, as stageR does, and gives each gene's lowest effective dose. The tests check the contrasts, statistics and df against limma and multcomp fixtures, the p-values against scipy within simulation error, the lowest effective doses against stageR and a closed test, Dunnett's t-statistics against each dose's own, and the refusals, records and seeds.
validation/dose_contrasts.py checks the candidate shapes against DoseFinding's guesst, getResp and the rule computed in R, with mpmath for the exponential shapes' roots; optimal_contrasts against optContr; the MCP step on seeded inputs against MCTtest and multcomp's glht, singular correlations included; the three tests of dose_response against limma, edgeR and variancePartition fits made in R from the counts, with multcomp's contrMat and optContr; their p-values at non-integer df against scipy; and the stage-wise calls and lowest effective doses against stageR and a closed test enumerated in R. It writes the fixtures in tests/data/dose_contrasts and, with --benchmark, times dose_response with each test on 20,000 genes. validation/dose_response_calibration.py gains the three tests' null and power rows on the core grid, with a control row of per-dose calls at an unadjusted 0.05, and the stage-wise calls of lowest_effective_doses: their overall false discovery proportion, the false gene-dose calls, the share of screened genes with a dose called, and the lowest effective dose against the true benchmark dose.
The Dose response chapter gains "Trends, doses against the vehicle and candidate shapes", on the three multiple contrast tests, the candidate shapes and their optimal contrasts, with the costs measured, and "From which dose a gene responds", on the stage-wise calls, what the lowest effective dose is and is not, and every dose called; with defaults, limits and checks. Multiple testing gains "Calling contrasts across genes", on stageR's procedure and the overall false discovery rate it controls, linked from the reading of a gene's contrasts at alpha R / G. Choosing a method gains two questions, the glossary seven entries, the bibliography Bretz et al. (2005), Pinheiro et al. (2014), Duda et al. (2022), ICH E4 (1994), Shaffer (1986) and Heller et al. (2009), and the API reference a page for CandidateShapes. The guide "Dose response per cell type" tests a few expected shapes on its simulated series and finds each gene's lowest effective dose, against the truth. A test runs the chapter's new examples and checks their printouts and stated numbers against the simulator's truth.
The Validation page gains a section for validation/dose_contrasts.py, with what its recorded run printed, its time and memory, a row in the summary, the benchmark's times and the commands that reproduce it. The section on the error rates and power of the dose tests gains the rows of the three multiple contrast tests, their null shares, calls, power and false discovery proportions, and those of the stage-wise calls of lowest_effective_doses: their overall false discovery proportion, the false gene-dose calls, the genes with a dose called and the lowest effective dose against the true benchmark dose. The Dose response chapter cites the power and the overall false discovery proportion they found. docs/validation_runs.toml records the digests of the code that the two runs checked.
Optimal contrasts of shapes whose changes were tiny or huge underflowed or overflowed to infinite or zero weights, and a steep sigmoid Emax shape far from its ED50 raised OverflowError, so dose_response could fail in a cell type that keeps only low doses. With contrast_standard_errors="limma", the three multiple contrast tests took each gene's covariance from limma's approximation, which multiple_contrast_test refuses and which moved Williams-type and MCP p-values by up to 100-fold. The chapter said that "dunnett" gives each dose's own result, did not say that Shaffer's first step needs the screen to have tested the hypotheses given, and called dream's smallest dose df conservative for every test. optimal_contrasts now scales the shapes and the covariance before it solves and takes named shapes only; the sigmoid Emax shape is computed in logarithms; dose_response refuses the three tests with limma's approximate standard errors, and its printout names the shapes left out. The chapter shows each dose's own adjusted p-value through multiple_contrast_test, what the MCP step's contrast names, EMA's minimum by step, and dream's df as an approximation with its size; the guide plots the candidate shapes, counts flat calls and shows the contrast each called gene names. Private helpers lose a defensive guard, a second reader of numbers and a second array form of shapes. validation/dose_contrasts.py ran again without the jobs of limma's standard errors: 80 checks, 0 failed. New tests pin the seed of a test named alone, the change at each lowest effective dose, the adjustment within a cell type, symbols, the thread limit, a beta scale at the top dose and shapes at extreme scales; 15 deliberate bugs were each caught.
The ValueError entry of dose_response's docstring broke "the design names" onto a line of its own, which help() shows as a stray short line. The entry now wraps as the rest of the docstring does; its text is unchanged.
parashardhapola
deleted the
dose/08-trend-contrasts-and-lowest-effective-dose
branch
November 20, 2026 17:36
parashardhapola
added a commit
that referenced
this pull request
Nov 21, 2026
A dose series runs several tests of each gene, and nothing said which of them decides that a gene responds, at which false discovery rate, or how a fold change enters that decision. Toxicology's prefilters cut the estimated change after the test, and in vehicle-only data or under permuted dose labels they found responsive genes in most runs (Lee et al. 2024; Bruns et al. 2026); at 2 replicates per dose, a cell type of 1,000 null genes had a spline call in 10% to 16% of simulated series. dose_response takes gate=, one recorded test of any response at a stated FDR after the dose-blind expression filter: the spline by default, the dose groups, Dunnett's, the Williams-type or the MCP test, or a fold change that TREAT tests at each dose, with Bonferroni over the doses and Benjamini-Hochberg across genes. Each cell type gains the table "gate" with passes_gate, and lowest_effective_doses reads the gate in place of the screen and alpha that #83 added. permutation_check runs the gate again on dose labels permuted among the samples that the design treats alike, every assignment where they are few, and gives a permutation p-value for whether the true doses pass more genes than permuted ones, with the smallest p-value the runs can give. Each result now records which genes count as responding and how that was decided, and the check answers at the user's own design whether those calls could come from noise. validation/dose_gate.py matches limma, edgeR, stageR and variancePartition fitted by R from the counts, and R's own enumeration and refits of the assignments, call for call; on simulated null series the default gate stays within the bound that 2,000 cell types allow at 3 replicates and exceeds it at 2, a known limit, and the check's runs pass genes as often as null series do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
dose_response(#81) says which genes respond to a dose in each cell type, through a spline F-test of one moderated fit, but not which doses differ from the vehicle, whether a response grows in dose order, which expected shape it follows, or from which dose it starts. Clinical pharmacology and toxicology ask exactly these questions. ICH E4 asks that the lowest dose recommended for use itself show an effect (ICH 1994); of 96 phase 2 dose-ranging trials in NEJM, The Lancet and JAMA (2018 to 2026) whose primary analysis could be determined, 66 tested each dose against placebo, 39 of them with a multiplicity procedure (a fixed sequence or hierarchy in 13, graphical or gatekeeping procedures in 7, Holm in 4, Dunnett in 3, Hochberg in 3), and MCP-Mod, which EMA qualified in 2014, was the primary analysis of 15. MCP-Mod's test step turns a few candidate shapes into the contrasts that best detect them and tests the largest of their t-statistics against the multivariate t (Bretz, Pinheiro and Branson 2005; Pinheiro et al. 2014). Toxicology reads each endpoint's lowest observed effect level from tests of each dose against the vehicle. In a dose series of 20,000 genes, calling each dose of every gene at 5% multiplies the false calls by the doses, so a gene's doses need an error rate over the genes as well as within the gene.The solution
Three multiple contrast tests of each cell type's one fit, which
dose_responseruns when named, and each gene's lowest effective dose:"dunnett","williams"and"mcp". Each dose against the vehicle (Dunnett 1955); the Williams-type test, the vehicle against the mean of the top one, two or more doses weighted by the cell type's samples (Bretz 2006); and the MCP step of MCP-Mod (multiple comparison procedure and modelling), the optimal contrast of each candidate shape for the cell type's doses and samples. Each is two-sided and refers the gene's largest moderated |t| to the multivariate t of Test which doses differ from the vehicle with multiple contrast tests #82, on the gene's df (under dream the smallest of its doses', an approximation), with the correlation that the gene's own covariance of its doses' estimates gives, voom's weights included; limma's approximate standard errors, which give no such covariance, are refused with them, as Test which doses differ from the vehicle with multiple contrast tests #82 refuses them. Itsp_valueis adjusted for the gene's contrasts (single-step), andadjusted_p_valueandadjusted_p_value_across_groupsadjust over genes by Benjamini-Hochberg. One recorded seed reproduces every p-value, whatever the other cell types and tests: each cell type and test draws fromdefault_rng([seed, crc32(name), position]). For the MCP step, a gene'scontrastnames the candidate whose contrast best matches its changes, not a fitted shape.cp.CandidateShapes. Emax, sigmoid Emax (the Hill equation), exponential and beta (an umbrella) shapes in DoseFinding's families.CandidateShapes.spreadplaces two Emax shapes, a sigmoid Emax shape of Hill slope 3, an exponential shape and a beta shape over a series' doses along the dose axis;meansgives each shape at any doses as DoseFinding'sgetRespdoes. A shape that does not change at a cell type's doses is left out there with the reason, and the printout says when more shapes than treated doses span fewer dimensions.DoseResponseResult.lowest_effective_doses(group, screen=, alpha=). Stage-wise calls as stageR makes them (Heller et al. 2009; Van den Berge et al. 2017): the screen, the spline by default, calls R of G genes by Benjamini-Hochberg; in each, the doses' moderated t-tests are called by Holm's step-down procedure with Shaffer's first step at the level R alpha / G; the lowest dose called is the lowest effective dose. The calls control the overall false discovery rate (OFDR) of the genes, the expected share of the genes called with a false call; the share of false gene-dose calls is not controlled, and the calibration reports it.cytepool.stats.multiple_contrasts:optimal_contrasts(DoseFinding'soptContr) andstage_wise_adjusted_p_values(stageR'sstageWiseAdjustment,"holm"or"none").The Dose response chapter gains "Trends, doses against the vehicle and candidate shapes" and "From which dose a gene responds"; Multiple testing gains "Calling contrasts across genes"; Choosing a method two questions; the glossary seven entries; the bibliography six works; the API reference a page for
CandidateShapes. The guide "Dose response per cell type" plots the spread shapes, tests them and finds each gene's lowest effective dose against the truth: on its hepatocytes the MCP step finds 223 of the 378 responses and calls 12 of the 1,491 flat genes, the spline 222 and 8, and the Williams-type test 165 and 7; 165 of the 230 genes the spline calls get a lowest effective dose, every one above the gene's true 1.1-fold benchmark dose (median 7.3 times). The chapter shows how to get each dose's own p-value, adjusted for the gene's doses, frommultiple_contrast_teston the cell type's fit.Why it matters
The first question of a dose series, which genes respond in each cell type (#81), now has its follow-ups on the same fit: which doses differ, whether the response grows in dose order or follows an expected shape, and from which dose a gene responds, with an error rate over the genes. It builds on #82 (the multivariate t,
multiple_contrast_test, Dunnett's and Williams-type contrasts) and #81 (dose_responseand its private dose-group estimates, which gain a dream branch). PR 9's gate can take these tests and defaultscreento its gate; PR 13 fits the candidate shapes, MCP-Mod's modelling step; PR 19 adds one-sided tests; PRs 21 and 22 run the MCP step on published series.Validation
Each script ran twice in one Modal container (4 CPU, 8 GiB, AMD Zen 3) and printed the same rows both times.
validation/dose_contrasts.py, run again at the final code after code review retired its jobs of limma's standard errors, printed 80 checks, 71 pass, 7 deliberate differences and 2 information, 0 failed; the second run took 3 min 23 s with a peak memory of 940 MiB. Each reference runs as a program of its own on numbers only: DoseFinding 1.4-2, multcomp 1.4-32, mvtnorm 1.4-2 and stageR 1.28.0; limma 3.62.1 and edgeR 4.4.0 fitting each cell type from its counts in R, and variancePartition 1.36.2 for dream; scipy 1.18.1 and mpmath 1.3.0 in a process without CytePool.CandidateShapes.spread: ED50s, Hill slopes, beta parameters and scale, 60 cases on 5 laddersguesstguesst, a root searchCandidateShapes.means, 6 sets of shapes at 3 to 9 doses, beta peaks between doses and above the topgetResp(Mods(...))optimal_contrasts: groups of sizes n, a general covariance, the vehicle's row dropped; 6 designs of 3 to 9 groupsoptContrMCTtest; multcompglht(parm())summary(glht()), mvtnorm, error over 3stage_wise_adjusted_p_values,"none"and"holm", alpha 0.05 and 0.1, 1 to 8 hypotheses, ties and missing valuesstageWiseAdjustment"holm"(2,420)dose_response: genes, doses compared and samples per dose, 15 cell typesglht(parm())oncontrMatandoptContrdream, then multcompmultivariate_t.cdf, 8 calls, on R's t, correlations and dflowest_effective_doses, spline and dose-group screens: doses called, the screen's calls, the adjusted p-value at the lowest effective dosesummary(glht())refuse; one hypothesis per feature, where stageR's"holm"fails, at alpha 0.05 and 0.1; a called feature with one hypothesis left of four, to which stageR gives 0 and CytePool Bonferroni at the screen's levelR warned 244 times, every warning mvtnorm's "Completion with error > abseps" (171 in
summary(glht()), 73 inMCTtest), on p-values whose reported error exceeds mvtnorm's default absolute error of 1e-3; the comparisons use each p-value's reported error, and the 12 p-values below 1e-3 are not compared.validation/dose_response_calibration.pyprinted 101 checks, 97 information and 4 controls, 0 failed, and #81's 53 rows as recorded; the second run took 41 min 52 s with a peak memory of 447 MiB. The three tests ran on the first 200 null datasets and the 10 power datasets of each design cell of the core grid (4 and 9 dose groups, 2 and 3 replicates, 2 cell types of 1,000 genes), and the stage-wise calls oflowest_effective_doses, with the spline as screen, on the power datasets:Under the null the shares of p-values below 0.05 were 0.050 to 0.053 (standard error 0.0005), the MCP step's the highest, as the spline's are, and a cell type of 1,000 null genes had a call in 8.3% to 17.0% of the datasets with 2 replicates and 4.5% to 7.5% with 3: the tail that moderation at few residual degrees of freedom gives #81's F-tests too. The MCP step found as many responsive genes as the spline at 4 dose groups (0.272 and 0.377, the spline 0.265 and 0.371, standard errors about 0.01) and more at 9 (0.421 and 0.489 against 0.386 and 0.466), and as many bells as the spline at 9 dose groups (0.44 and 0.51, the spline 0.44 and 0.53, the Williams-type test 0.17 and 0.26). The stage-wise calls kept the overall false discovery proportion within 1.2 standard errors of 0.05, with 0.8% to 3.9% of the gene-dose calls false, and the lowest effective dose lay a median of 8.9 to 14 times above the gene's true benchmark dose of a 1.1-fold change. The four controls, calls of each dose at an unadjusted 0.05, called a dose in all 400 null cell types of each design cell, as they must.
Modal runs, each an ephemeral app through the reference harness:
pr08-build-probe)Modsscales a beta shape whose peak lies above the doses, whetherglht(parm())takes singular correlations and non-integer df, where dream keeps each gene's covarianceglhtrefuses non-integer df only insummary; dream'scov.coefficients.listpr08-r-sideto-5)optContrwith the placebo dose, DoseFinding's overflow at delta = D / 1000, stageR with one column); run 5 passeddose_contrasts.pyon an overlay of master, PR 4 (e0b9439), PR 7 (dfb50da) and this PR"holm"on inputs it cannot take, dream without variancePartition's span of 0.5, and the scipy rows of the dream job"holm"with missing values (pr08-stager-na-probe)dose_contrasts.py --write-fixtureson the overlaydose_contrasts.py --write-fixtureson PR 7's merged code (ff11d1f), PR 4's final code (b6ea399) and this PR'sdose_contrasts.py --benchmarkdose_responsedose_contrasts.py --write-fixturestwice in one containerdose_response_calibration.pytwice in one containerdose_contrasts.pywith an R profile that prints warnings (pr08-r-warnings)Rscript --vanillaskips the profiledose_contrasts.pytwice, after the reference line printed R oncedose_contrasts.pywith each Rscript behind a wrapper that prints warnings (pr08-r-warnings-2)dose_contrasts.py --write-fixturestwice in one containermake -C docs check-outputs PAGES="guides/dose_response", with the harness's AVX2 settings unsetdose_contrasts.py --write-fixturestwice in one container, after code reviewdocs/changed_since_run.pylists 34 scripts on master after #82, whose changes tocytepool/design/_contrast_weights.pyandcytepool/stats/_result_tables.pyreach most scripts, and 35 on this branch: those of master andmultiple_contrast_tests.py. This PR recordsdose_contrasts.py.dose_response_calibration.pyran at 13:57; code review then changed code it checks, the scaling inoptimal_contrastsand the sigmoid Emax shape in logarithms, which move the MCP step's contrasts by about one unit in the last place. Its numbers stand, so it was not run again: on 12 of its datasets (3 null and 2 power datasets of each design cell with 2 replicates), run through the calibration's own code at both heads, the three tests' p-values agreed within 1.1e-14 (relative) and their t-statistics within 2.4e-15, and the contrasts named, the lowest effective doses and their stage-wise adjusted p-values were identical, while the printed rows round to 3 or 4 digits. The PR's code reaches 14 others without changing what they check, so they were not run again:multiple_contrast_tests.pythroughcytepool/stats/multiple_contrasts.py(two functions added, and_check_symmetrictakes the argument's name);dose_axes.py,dose_design.py,dose_response_tests.pyandsimulate_dose_series.pythroughcytepool/_doses.py, which takesDoseAxis's reading of a sample table's doses unchanged; andactivity.py,combined_p_values_and_replication.py,gene_set_files_and_ora.py,gsea.py,pathway_scores.py,pca_and_dot_plots.py,plotting.py,sumrank.pyandvariance_partitioning.pythroughcytepool.plotting, which importscytepool.dose_responses.Tests
New tests: 19 in
tests/test_candidate_shapes.py(35 with their cases), 12 intests/test_multiple_contrasts.py(42) and 19 intests/test_dose_responses.py(20), with the new callables in the masked-input and top-level registries. They check against independent references: DoseFinding 1.4-2, stageR 1.28.0, multcomp and R's limma fits through the fixtures thatvalidation/dose_contrasts.py --write-fixtureswrote totests/data/dose_contrasts(635 KB); values derived by hand (the optimal contrast of mu = (0, 1, 2) for n = (2, 1, 1), proportional to (-1.5, 0.25, 1.25); a stage-wise table worked by hand; the series expansion of a nearly linear exponential shape); a closed test of Bonferroni tests enumerated in the test; and invariants that a wrong implementation breaks: unit invariance of the shapes and contrasts, the non-centrality that the optimal contrast maximises, Dunnett's t equal to each dose's own t, dream's df as the smallest of a gene's doses, p-values independent of threads, cell-type order, other cell types and the other tests named, the seed rule pinned by a direct call ofmultiple_contrast_test, contrasts unchanged by shapes and covariances scaled to 1e-200, 1e200 and 1e-300, and steep sigmoid shapes far from their ED50 that overflow nowhere. A test runs the chapter's new examples, each dose's own p-value included, and compares their printouts and stated numbers with the simulator's truth.Mutations, each run against the tests and each caught (test that caught it); two of them, Shaffer's first multiplier m and the lowest effective dose as the highest called, were run again at the final head, on a copy of the package, and caught again:
test_stage_wise_matches_stagertest_stage_wise_edge_casestest_optimal_contrasts_match_optcontrtest_spread_matches_the_rule_and_guessttest_means_match_dosefindingtest_a_nearly_linear_exponential_keeps_its_digitstest_lowest_effective_doses_match_stagertest_multiple_contrast_tests_match_r[voom]test_dunnett_t_is_each_dose_s_ttest_contrast_tests_do_not_depend_on_threads_order_or_other_cell_typestest_a_flat_shape_is_left_outtest_lowest_effective_doses_by_the_closed_testtest_contrast_tests_do_not_depend_on_threads_order_or_other_cell_typesadjusted_p_valueof the three tests left unadjustedtest_the_contrast_tests_read_backbeta_scaleequal to the top dose refusedtest_a_beta_scale_at_the_top_dose_is_acceptedtest_few_dose_groupstest_a_flat_shape_is_left_outtest_the_contrast_tables_carry_the_genes_symbolsn_threadsnot passed ontest_the_contrast_tests_follow_the_thread_limittest_contrast_test_arguments_are_refused_with_a_fixtest_optimal_contrasts_do_not_depend_on_the_scale,test_a_flat_shape_is_left_outtest_a_steep_sigmoid_far_from_its_ed50_neither_overflows_nor_warnstest_optimal_contrasts_refuseCoverage at the final head (coverage 7.13.1, branches; none of the new code is compiled by numba, so the pass ran with the JIT on), over the tests of the candidate shapes, multiple contrasts, dose responses, dose axes, dose designs, masked inputs and the top level:
cytepool/candidate_shapes.py,cytepool/dose_responses.py,cytepool/stats/multiple_contrasts.py,cytepool/_doses.pyandcytepool/dose_axes.py100% of 1,393 statements and 442 branches (1,995 tests).Checks at the final head: the full suite 6,023 passed and 18 skipped (zstd needs Python 3.14);
ruff checkandruff format --checkoncytepool tests validation docsclean;mypy cytepoolclean (94 files); the Sphinx API reference built here with warnings as errors, and the whole CI documentation build (Node 24, Sphinx with warnings as errors, MyST strict) passed on Modal, since this machine has no Node.js;make -C docs check-outputs PAGES="guides/dose_response"found the guide's outputs current, here and on Modal with the harness's AVX2 settings unset (before code review on an Intel host with AVX-512, as on GitHub's runners; after it on AMD hosts without it). The guide's two statements that no cell prints, that every lowest effective dose lies above the gene's true 1.1-fold benchmark dose and that two of the 165 genes with a dose called are flat, were checked by running its code: the smallest ratio was 1.07, and the two genes without a finite benchmark dose are the two flat ones.Decisions
"holm"gives it 0, or stops when the gene had two hypotheses or one (deliberate differences).method="none", which held 0.050 at 0.05 where Shaffer's step gave 0.073 in a simulation); Holm's m in rows with a missing value would have parted from stageR on every such row.dose_responsepasses no missing p-values.lowest_effective_dosescomputed on demand withscreen=andalpha=: stage-wise values hold only at the level given, so no level is hidden in a table, and PR 9's gate can supply the screen.lowest_effective_dosesraises a KeyError that says why and names the tests of any response it ran, rather than taking the next test silently, so one call never rests on different screens in different cell types."linear_trend"and"nonlinearity"are refused as screens, since they test a line or a departure from one, not any response.CandidateShapesrather thanCandidates, which does not say of what at the package's top level; each field names a DoseFinding model family, sobetarather thanumbrella, with "umbrella shape" in its docstring and the glossary;spread's counts aren_emax,n_sigmoid_emax,n_exponentialandn_beta, sinceemax=2is an ED50 in DoseFinding'sMods; the level isalpha, as stageR and CytePool's other calls name it; the column isstage_wise_adjusted_p_value, sinceadjusted_p_valuemeans Benjamini-Hochberg within the cell type in every other table. Choosing a method asks "Does a response follow one of a few expected shapes?" rather than "Is there a dose signal under shape uncertainty?", in the words of the chapter's table.Modsdoes;spreadplaces shapes along the axis's positions, the exponential on the dose scale, with a sigmoid Emax slope of 3.contrast_standard_errors="limma"), as Test which doses differ from the vehicle with multiple contrast tests #82'smultiple_contrast_testrefuses such fits: they give no covariance of a gene's doses' estimates, and with them the Williams-type and MCP p-values of a simulated 9-group series moved by up to 100-fold.optimal_contraststakes named shapes only, a mapping as DoseFinding'soptContrtakes named models; it scales the shapes and the covariance before solving, so shapes of any magnitude give their contrasts.lowest_effective_doses, and PR 13's modelling step recomputes the shapes it fits); critical values and constrained contrasts (MCTtest(critV),optContr(type = "constrained")), out, as p-values do not need them; DoseFinding's quadratic umbrella, to PR 13's model set if fitting needs it; MCP-Mod's modelling step, PR 13._check_symmetrictakes the argument's name, "covariances" by default, so thatoptimal_contrastsnamescovariance; Test which doses differ from the vehicle with multiple contrast tests #82's own messages are unchanged.